package com.vegetable.modules.entity.finance;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 交易流水与付款记录匹配关系
 * </p>
 *
 * @author Qoder
 * @since 2025-11-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("transaction_payment_match")
@ApiModel(value="TransactionPaymentMatch对象", description="交易流水与付款记录匹配关系")
public class TransactionPaymentMatch extends BaseEntity {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "交易流水ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long transactionId;

    @ApiModelProperty(value = "付款记录ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long paymentId;

    @ApiModelProperty(value = "匹配金额")
    private BigDecimal matchAmount;

    @ApiModelProperty(value = "匹配时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date matchTime;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}